package com.ericsson.enap.modules.ossalarm.job.ims;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.ossalarm.task.ims.OssFromNMSAlarmClearTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * IMS 经NMS转发的OSS告警过期数据清除
 * @author yanghai
 */
@Component
public class OssFromNMSAlarmClearJob implements MainJob {
    @Autowired
    QuartzTableManager quartzTableManager;
    @Autowired
    OssFromNMSAlarmClearTask ossFromNMSAlarmClearTask;
    String jobName="ossFromNMSAlarmClearJob";
    @Override
    public void doTask() {
        System.out.println("OssFromNMSAlarmClearJob start.....");
        //ossFromNMSAlarmClearTask.execute();
        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName, ManualQuartzJob.class,"0 0 1 * * ?",ossFromNMSAlarmClearTask);
    }
}
